// PrPageScript.cpp : implementation file
//

#include "stdafx.h"
#include "ansieditor.h"
#include "PrPageScript.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPrPageScript dialog


CPrPageScript::CPrPageScript(CWnd* pParent /*=NULL*/)
	: CPrPage(CPrPageScript::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPrPageScript)
	m_bRunStartupScript = FALSE;
	m_bPromptDocScript = FALSE;
	//}}AFX_DATA_INIT
}


void CPrPageScript::DoDataExchange(CDataExchange* pDX)
{
	CPrPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPrPageScript)
	DDX_Check(pDX, IDC_CHK_RUNSTARTUPSCRIPT, m_bRunStartupScript);
	DDX_Check(pDX, IDC_CHK_PROMPTDOCSCRIPT, m_bPromptDocScript);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPrPageScript, CPrPage)
	//{{AFX_MSG_MAP(CPrPageScript)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPrPageScript message handlers


BOOL CPrPageScript::OnInitDialog() 
{
	m_bRunStartupScript = gpApp->m_options.bRunStartupScript;
	m_bPromptDocScript = gpApp->m_options.bPromptDocScript;

	CPrPage::OnInitDialog();
	
	return TRUE;
}

BOOL CPrPageScript::ValidateData()
{
	UpdateData();
	gpApp->m_options.bRunStartupScript = m_bRunStartupScript;
	gpApp->m_options.bPromptDocScript = m_bPromptDocScript;
	return TRUE;
}